Skip to main content

Unit 4 Exercise 6

Exercise 6: SubSchedule - Multiple Runs

Objective

To create a schedule that utilizes a sub-schedule called by multiple container jobs.

Summary

Create a Sub-Schedule named SS-Repeating with an Instance Definition called RUNTIME with a values of 10. This Sub-Schedule will have 5 Windows jobs that run in a sequential chain.

Example: Job 1 Job 2 Job 3 Job 4 Job 5

Create a Schedule named Repeating Schedule. This schedule will contain 4 container jobs that each will call the sub-schedule and will run at specified times during the day.

Instructions

Create the Sub-Schedule

  1. In Library > Administration, select on Master Schedules.
  2. Click the Add button.
  3. On Master Schedule Definition screen:
  • In the Name field, enter SS-Repeating.
  • In the Documentation field, enter some documentation
    • Example: This is the Daily Sub-Schedule.
  • In the Schedule Settings frame, mark the SubSchedule checkbox.
  • Saturday and Sunday are working days.
  • This sub-schedule doesn't use the Master Holiday Calendar
  • Click the Save button.
  1. Click Back

Add Jobs to the SubSchedule

  1. In Studio, select SS-Repeating.
  2. Click the View button.
  3. Select Add Job in the side menu.
  4. On the Master Job Definition screen:
  • In the Name textbox, enter Job 1.
  • In the Job Type dropdown, select Windows.
  • In the Machine Selection dropdown, select the SMATraining.
  • In the User ID dropdown, select SMATRAINING\SMAUSER.
  • In the Command Line field, type: "[[PATH_Windows]]\genericp.exe" -t[[RUNTIME]]
  • Click the Save.
  • Click the Lock icon in the upper right-hand corner.
  • Scroll to and expand the Frequency box.
  • Within the Frequency box, select Example-Mon-Sun-O in the Inactive list and move it to the Active list.
  • Click the Save button.
  1. Click Back.
  2. Utilizing the Copy function, copy Job 1 until you have 5 jobs total.
  3. Create Dependencies between the 5 jobs so they run in a sequential chain.
  • Job 1 Job 2 Job 3 Job 4 Job 5

Create the Primary Schedule

  1. In Library > Administration, select on Master Schedules.
  2. Click the Add button.
  • In the Name field, enter Repeating Schedule.
  • In the Documentation field, enter some documentation
    • Example: This is the Primary Schedule for the Repeating SubSchedule example.
  • Saturday and Sunday are NOT working days.
  • This sub-schedule does use the Master Holiday Calendar
  • Click the Save button.
  1. Click Back.

Add the Container Job to the Schedule

  1. In Studio, using the filter locate and select Repeating Schedule.
  2. Click the View button.
  3. Select Add Job in the side menu.
  4. On the Job Master Definition screen:
  • In the Name textbox, enter 0700 Job.
  • In the Job Type dropdown list, select Container.
  • On the Master SubSchedule dropdown list select SS-Repeating.
  • Click the Save button.
  • Click the Lock icon in the upper right-hand corner.
  • Expand the Documentation box and enter in some documentation.
    • Example: **This is a container Job that has the Daily Jobs.
  • Scroll to and expand the Frequency box.
  • Within the Frequency box, select Mon-Fri-N in the Inactive list and move it to the Active list.
  • Select the Active Frequency.
  • Scroll down to the Offset Information, in the Start Offset field, enter 07:00.
  • Click the Save button.
  1. Click Back.
  2. Utilizing the Copy function, copy the 0700 Job until you have a 1000 Job, 1400 Job, and 1900 Job.
  3. Edit each of the copied jobs to modify the Frequency Information so the Start Offset matches the time in the job name.
  • Example: 1000 Job would have a Start Offset of 10:00.

Build the Schedule

  1. Build the Repeating Schedule for today and allow it to run.
  2. Valdiate that the jobs in one of the 4 sub-schedules run successfully.

Enterprise Manager

Details

Create the SubSchedule

  1. Under the Administration topic, Double-Click on Schedule Master.
  2. Click the Add button on the Schedule Master toolbar.
  3. In the Name textbox, enter SS-Repeating.
  4. In the Documentation textbox, enter This is the Daily SubSchedule.
  5. In the Start Time box, notice the default of 00:00 (midnight).
  6. Keep the defaults selected for the Workdays per Week for the Schedule to run.
  7. In the Schedule Properties frame, mark the SubSchedule checkbox.
  8. Click the Save button on the Schedule Master toolbar.
  9. Click the Instance Definition tab and type the Instance in the Define Property Values field: RUNTIME=10
  10. Press the Add button
  11. Save the SS-Repeating and close the Schedule Master tab.

Add Jobs to the SubSchedule

  1. Under the Administration topic, Double-Click on Job Master.
  2. Select the SS-Repeating Schedule.
  3. Click the Add button on the Job Master toolbar.
  4. In the Name textbox, enter Daily Job 1.
  5. In the Job Type drop-down list, select Windows.
  6. In the Primary Machine drop-down list, select the SMATraining machine.
  7. In the User ID drop-down list, select SMATRAINING\SMAUSER.
  8. In the Command Line, type Ctrl+F and select the command line that looks like this: "[[MI.PathWindows]]\genericp.exe" -t[[RUNTIME]] -e0
  9. Click the Save button on the Job Master toolbar.
  10. Click the Frequency tab.
  11. Within the Frequency list frame, click the Add button.
  12. Click inside the option button to Use existing Frequency.
  13. In the Frequency drop-down list, select Mon-Fri-N.
  14. Click Next.
  15. Click the Finish button.
  16. Add Documentation to the Job.
  17. On the Job Master toolbar, be sure you have the SS-Repeating selected and click the Copy button or press Ctrl+Insert.
  18. Name the Job Daily Job 2.
  19. Click OK.
  20. Change the Documentation if needed.
  21. Repeat steps 27 to 30 to create Jobs Daily Job 3, Daily Job 4, and Daily Job 5.
  22. Close the Job Master tab and use Workflow Designer to create Dependencies.
  23. Close the Workflow Designer tab when finished.

Create the Primary Schedule

  1. Under the Administration topic, Double-Click on Schedule Master.
  2. Click the Add button on the Schedule Master toolbar.
  3. In the Name textbox, enter Repeating Schedule.
  4. In the Documentation textbox, enter This is the Primary Schedule for the Repeating SubSchedule example.
  5. In the Start Time box, notice the default of 00:00 (midnight).
  6. Keep the default selected for the Workdays per Week for the Schedule to run.
  7. Click the Save button on the Schedule Master toolbar.
  8. Close the Schedule Master tab.

Add the SubSchedule as a Container Job into the Primary Schedule

  1. Under the Administration topic, Double-Click on Job Master.
  2. Select the Repeating Schedule from the Schedule drop-down list.
  3. Click the Add button on the Job Master toolbar.
  4. In the Name textbox, enter 0700 Job.
  5. In the Job Type drop-down list, select Container.
  6. On the Schedule to run as SubSchedule drop-down list select the SS-Repeating.
  7. Click the Save button on the Job Master toolbar.
  8. Click the Frequency tab.
  9. Within the Frequency list frame, click the Add button.
  10. Click inside the option button to Use existing Frequency.
  11. In the Frequency drop-down list, select Mon-Fri-N.
  12. Click Next and then Finish.
  13. In the Start Offset box, enter 07:00.
  14. Click the Save button on the Job Master toolbar.
  15. Click the Documentation tab.
  16. In the Documentation textbox, enter This is a container Job that has the Daily Jobs.
  17. Click the Save button on the Job Master toolbar.
  18. Still on the Job Master Toolbar, click the Copy button.
  19. Name the Job 1000 Job.
  20. Click OK.
  21. Click the Frequency tab.
  22. Update the Start Offset box to 10:00 and Save the Job.
  23. Repeat steps 59 to 63 creating a 1400 Job and a 1900 Job running at 2 pm and 7 pm. You will need to change the Start Offset for these Jobs. Change the Documentation if needed.
  24. Close all tabs.

Build the Schedule

  1. Under the Operation topic, Double-Click Schedule Build.
  2. Is the SubSchedule visible? Why?
  3. Click the Repeating Schedule and click the Build button.
  4. On the Build Properties screen, leave On Hold selected and click OK. This will build the Schedule for today only.
  5. Close the Build Schedules screen.
  6. Under Operations, open the List or Matrix view or use Solution Manager to check the results.
  7. Release the Schedule and let the Jobs run.